Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option --forceflush to force flushing of output at the end of each interval #377

Merged
merged 1 commit into from
Mar 25, 2016

Conversation

quasoft
Copy link
Contributor

@quasoft quasoft commented Mar 6, 2016

Fixes #299

As discussed in issue #299 piping the output of iperf to another process, introduces buffering in output and delay in receiving updates by the other process.

This can be fixed by using tools like unbuffer, expect and stdbuf on UNIX/Linux, but those tools are not easy to get to work in Windows.

This pull request adds a command line option named --forceflush, that allows the user to request flushing of output at the end of each interval. That way users can take advantage of this option, if (and only if) buffering output (eg. when piping output) is a problem in their specific case, without the necessity of relying on external tools.

Similar problem existed when piping output to a file. The file was not updated fast enough and could not be monitored in realtime. Pull #272 fixed that by calling iflush on iprintf in interval.

Current pull request uses the same approach, but adds a command line option named --forceflush (optional), that can be used to force flushing, even if not logging output to file.

…ing of output at the end of each interval.

Fixes esnet#299
@bmah888 bmah888 merged commit 4fbdab3 into esnet:master Mar 25, 2016
@bmah888 bmah888 self-assigned this Mar 25, 2016
@bmah888
Copy link
Contributor

bmah888 commented Mar 25, 2016

Merged, thanks!

@bmah888 bmah888 added this to the 3.2 milestone Mar 25, 2016
@quasoft quasoft deleted the forceflush branch March 25, 2016 18:14
@bmah888 bmah888 modified the milestones: 3.1.x, 3.2 Nov 10, 2016
@bmah888 bmah888 added the merge label Nov 10, 2016
bmah888 added a commit that referenced this pull request Nov 10, 2016
Add option `--forceflush` to force flushing of output at the end of each interval
(cherry picked from commit 4fbdab3)

Signed-off-by: Bruce A. Mah <bmah@es.net>

Conflicts:
	src/iperf.h
	src/iperf_api.h
@bmah888
Copy link
Contributor

bmah888 commented Nov 10, 2016

Merged to 3.1-STABLE branch in 72ab703 per discussion in #458.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use QProcess to control iperf3 in QT
2 participants